package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DrivingcarMapper;
import com.ruoyi.system.domain.Drivingcar;
import com.ruoyi.system.service.IDrivingcarService;
import com.ruoyi.common.support.Convert;

/**
 * 代驾服务 服务层实现
 * 
 * @author ruoyi
 * @date 2019-07-16
 */
@Service
public class DrivingcarServiceImpl implements IDrivingcarService 
{
	@Autowired
	private DrivingcarMapper drivingcarMapper;

	/**
     * 查询代驾服务信息
     * 
     * @param drivingcarId 代驾服务ID
     * @return 代驾服务信息
     */
    @Override
	public Drivingcar selectDrivingcarById(Integer drivingcarId)
	{
	    return drivingcarMapper.selectDrivingcarById(drivingcarId);
	}
	
	/**
     * 查询代驾服务列表
     * 
     * @param drivingcar 代驾服务信息
     * @return 代驾服务集合
     */
	@Override
	public List<Drivingcar> selectDrivingcarList(Drivingcar drivingcar)
	{
	    return drivingcarMapper.selectDrivingcarList(drivingcar);
	}
	
    /**
     * 新增代驾服务
     * 
     * @param drivingcar 代驾服务信息
     * @return 结果
     */
	@Override
	public int insertDrivingcar(Drivingcar drivingcar)
	{
	    return drivingcarMapper.insertDrivingcar(drivingcar);
	}
	
	/**
     * 修改代驾服务
     * 
     * @param drivingcar 代驾服务信息
     * @return 结果
     */
	@Override
	public int updateDrivingcar(Drivingcar drivingcar)
	{
	    return drivingcarMapper.updateDrivingcar(drivingcar);
	}

	/**
     * 删除代驾服务对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteDrivingcarByIds(String ids)
	{
		return drivingcarMapper.deleteDrivingcarByIds(Convert.toStrArray(ids));
	}
	
}
